var mongoose=require('mongoose');
var multer=require('multer');
var Upload=require('../models/upload.model');

exports.filedata = (function(req,res,next){
    var upload =multer({dest:'uploads/'}).single('avatar');
    upload(req,res,function(err){
        console.log(req.file);

        // var uploads=new Upload(req.file);
        // uploads.save(req.file)
    })
    
})